package Starter;

import BaseObject.Motor;
import BaseObject.Taxi;
import View.SimulationInterface;

public class Starter {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
	

		Motor motor = new Motor();
		motor.initialize();
		
		
		for(int i=0;i<Motor.nbTaxis;i++)
		{
			Motor.taxis.add(new Taxi());
		}
		

		SimulationInterface s = new SimulationInterface(motor);
		
		while(!motor.StopTheSystem()){
			try {
				Thread.sleep(100);
				s.repaint();
			
				motor.updateClients();
				motor.updateTaxis();
				motor.increaseCurrentTime();
			
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}

		System.out.println("-----RECAPITULATIF------------");
		System.out.println("Nombre de client produit : " + motor.getNbClientProduced());
		System.out.println("Nombre de client satisfait : " + motor.getNbClientDone());
		System.out.println("Nombre de client non Satisfait : " + motor.getNbClientMissed());
		System.out.println("FIN DU PROGRAMME");
		
		
		

	}

}
